import axios from 'axios'

export const getComputerRooms = (skip = 0, limit = 100) => {
  return axios.get(`/computer-rooms?skip=${skip}&limit=${limit}`)
}

export const getComputerRoomById = (roomId) => {
  return axios.get(`/computer-rooms/${roomId}`)
}

export const createComputerRoom = (roomData) => {
  return axios.post('/computer-rooms', roomData)
}

// 修改费率接口
export const updateRoomRate = (roomId, hourly_rate) => {
  return axios.patch(`/computer-rooms/${roomId}/rate?hourly_rate=${hourly_rate}`)
}

export const updateRoomStatus = (roomId, status) => {
  return axios.patch(`/computer-rooms/${roomId}/status?status=${status}`)
}
export const deleteComputerRoom = (roomId) => {
  return axios.delete(`/computer-rooms/${roomId}`)
}
